//////////////////////////////////////////////////////////////////////////
public:
	/// <summary>
	/// Simplified Delaunay diagram creation
	/// </summary>
	/// <param name="rect"></param>
	/// <returns></returns>
	static ManagedSubdiv2D^ CreateSubdivDelaunay2D(NAMESPACE::Rect rect, ManagedMemStorage^ storage)
	{
		return gcnew ManagedSubdiv2D(cvCreateSubdivDelaunay2D(*(CvRect*)&rect, storage->ToCvMemStoragePointer()));
	}

	/// <summary>
	/// Basic quad-edge navigation and operations
	/// </summary>
	/// <returns></returns>
	static Subdiv2DEdge Subdiv2DNextEdge(Subdiv2DEdge edge)
	{
		CvSubdiv2DEdge next = cvSubdiv2DNextEdge(*(CvSubdiv2DEdge*)&edge);
		return *(Subdiv2DEdge*)&next;
	}

	/// <summary>
	/// </summary>
	/// <param name="edge"></param>
	/// <returns></returns>
	static Subdiv2DEdge Subdiv2DRotateEdge(Subdiv2DEdge edge, int rotate)
	{
		CvSubdiv2DEdge next = cvSubdiv2DRotateEdge(*(CvSubdiv2DEdge*)&edge, rotate);
		return *(Subdiv2DEdge*)&next;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static Subdiv2DEdge Subdiv2DSymEdge(Subdiv2DEdge edge)
	{
		CvSubdiv2DEdge next = cvSubdiv2DSymEdge(*(CvSubdiv2DEdge*)&edge);
		return *(Subdiv2DEdge*)&next;
	}

	/// <summary>
	/// </summary>
	/// <param name="edge"></param>
	/// <returns></returns>
	static Subdiv2DEdge Subdiv2DGetEdge(Subdiv2DEdge edge, NextEdgeType type)
	{
		CvSubdiv2DEdge next = cvSubdiv2DGetEdge(*(CvSubdiv2DEdge*)&edge, (CvNextEdgeType)type);
		return *(Subdiv2DEdge*)&next;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static IntPtr Subdiv2DEdgeOrg(Subdiv2DEdge edge)
	{
		return IntPtr(cvSubdiv2DEdgeOrg(*(CvSubdiv2DEdge*)&edge));
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static IntPtr Subdiv2DEdgeDst(Subdiv2DEdge edge)
	{
		return IntPtr(cvSubdiv2DEdgeDst(*(CvSubdiv2DEdge*)&edge));
	}

	/// <summary>
	/// </summary>
	/// <param name="a"></param>
	/// <param name="b"></param>
	/// <returns></returns>
	static double TriangleArea(NAMESPACE::Point2D32f a, NAMESPACE::Point2D32f b, NAMESPACE::Point2D32f c)
	{
		return cvTriangleArea(*(CvPoint2D32f*)&a, *(CvPoint2D32f*)&b, *(CvPoint2D32f*)&c);
	}

	/// <summary>
	/// </summary>
	/// <param name="image"></param>
	/// <param name="hist"></param>
	/// <param name="accumulate"></param>
	static void CalcHist(array<ManagedImage^>^ image, ManagedHistogram^ hist, int accumulate, ManagedArr^ mask)
	{
		vector<IplImage*> vimage(image->Length);
		for (int i = 0; i < image->Length; i++)
		{
			vimage[i] = image[i]->ToIplImagePointer();
		}
		cvCalcHist(&vimage[0], hist->ToCvHistogramPointer(), accumulate, mask->ToCvArrPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="image"></param>
	/// <param name="hist"></param>
	static void CalcHist(array<ManagedImage^>^ image, ManagedHistogram^ hist, int accumulate)
	{
		vector<IplImage*> vimage(image->Length);
		for (int i = 0; i < image->Length; i++)
		{
			vimage[i] = image[i]->ToIplImagePointer();
		}
		cvCalcHist(&vimage[0], hist->ToCvHistogramPointer(), accumulate);
	}

	/// <summary>
	/// </summary>
	/// <param name="image"></param>
	static void CalcHist(array<ManagedImage^>^ image, ManagedHistogram^ hist)
	{
		vector<IplImage*> vimage(image->Length);
		for (int i = 0; i < image->Length; i++)
		{
			vimage[i] = image[i]->ToIplImagePointer();
		}
		cvCalcHist(&vimage[0], hist->ToCvHistogramPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="pt"></param>
	/// <param name="laplacian"></param>
	/// <param name="size"></param>
	/// <param name="dir"></param>
	/// <returns></returns>
	static NAMESPACE::SURFPoint SURFPoint(NAMESPACE::Point2D32f pt, int laplacian, int size, float dir, float hessian)
	{
		CvSURFPoint point = cvSURFPoint(*(CvPoint2D32f*)&pt, laplacian, size, dir, hessian);
		return *(NAMESPACE::SURFPoint*)&point;
	}

	/// <summary>
	/// </summary>
	/// <param name="pt"></param>
	/// <param name="laplacian"></param>
	/// <param name="size"></param>
	/// <returns></returns>
	static NAMESPACE::SURFPoint SURFPoint(NAMESPACE::Point2D32f pt, int laplacian, int size, float dir)
	{
		CvSURFPoint point = cvSURFPoint(*(CvPoint2D32f*)&pt, laplacian, size, dir);
		return *(NAMESPACE::SURFPoint*)&point;
	}

	/// <summary>
	/// </summary>
	/// <param name="pt"></param>
	/// <param name="laplacian"></param>
	/// <returns></returns>
	static NAMESPACE::SURFPoint SURFPoint(NAMESPACE::Point2D32f pt, int laplacian, int size)
	{
		CvSURFPoint point = cvSURFPoint(*(CvPoint2D32f*)&pt, laplacian, size);
		return *(NAMESPACE::SURFPoint*)&point;
	}

	/// <summary>
	/// </summary>
	/// <param name="pt"></param>
	/// <param name="size"></param>
	/// <returns></returns>
	static NAMESPACE::StarKeypoint StarKeypoint(NAMESPACE::Point2D32s pt, int size, float response)
	{
		CvStarKeypoint point = cvStarKeypoint(*(CvPoint*)&pt, size, response);
		return *(NAMESPACE::StarKeypoint*)&point;
	}

	/// <summary>
	/// </summary>
	/// <param name="maxSize"></param>
	/// <param name="responseThreshold"></param>
	/// <param name="lineThresholdProjected"></param>
	/// <param name="lineThresholdBinarized"></param>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize)
	{
		CvStarDetectorParams params = cvStarDetectorParams(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized, suppressNonmaxSize);
		return *(NAMESPACE::StarDetectorParams*)&params;
	}

	/// <summary>
	/// </summary>
	/// <param name="maxSize"></param>
	/// <param name="responseThreshold"></param>
	/// <param name="lineThresholdProjected"></param>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized)
	{
		CvStarDetectorParams params = cvStarDetectorParams(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized);
		return *(NAMESPACE::StarDetectorParams*)&params;
	}

	/// <summary>
	/// </summary>
	/// <param name="maxSize"></param>
	/// <param name="responseThreshold"></param>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams(int maxSize, int responseThreshold, int lineThresholdProjected)
	{
		CvStarDetectorParams params = cvStarDetectorParams(maxSize, responseThreshold, lineThresholdProjected);
		return *(NAMESPACE::StarDetectorParams*)&params;
	}

	/// <summary>
	/// </summary>
	/// <param name="maxSize"></param>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams(int maxSize, int responseThreshold)
	{
		CvStarDetectorParams params = cvStarDetectorParams(maxSize, responseThreshold);
		return *(NAMESPACE::StarDetectorParams*)&params;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams(int maxSize)
	{
		CvStarDetectorParams params = cvStarDetectorParams(maxSize);
		return *(NAMESPACE::StarDetectorParams*)&params;
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static NAMESPACE::StarDetectorParams StarDetectorParams()
	{
		CvStarDetectorParams params = cvStarDetectorParams();
		return *(NAMESPACE::StarDetectorParams*)&params;
	}


	//////////////////////////////////////////////////////////////////////////